﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdateByUser.aspx.cs" Inherits="admin_UpdateByUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
    <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>

    <style type="text/css">
<!--
html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
-->
</style>

</head>
<body>
    <form id="form1" runat="server">
        <div class="sub_right_top">
            <div class="hdm_footer">
    <!--个人资料-->
	<div id="tb1_1_content" class="cont01_word"  style="display:block;">
      <div class="person_ziliao">
         <div class="person_xinxi_title">个人信息</div>
         <form id="form2" name="form1" method="post" action="">
         <div class="person_xinxi_neirong">          
          <div class="person_neirong_list">登 录 名：
             <asp:TextBox ID="txtLoginName" runat="server" Enabled="False"></asp:TextBox>
           </div>

           <div class="person_neirong_list">真实姓名：
             <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
           </div>
           <div class="person_neirong_list">性&nbsp;&nbsp;&nbsp;&nbsp;别：
             <asp:DropDownList ID="ddlSex" runat="server" Font-Size="12px">
                        <asp:ListItem Value="true">男</asp:ListItem>
                        <asp:ListItem Value="false">女</asp:ListItem>
                    </asp:DropDownList>
           </div>
           <div class="person_neirong_list">民&nbsp;&nbsp;&nbsp;&nbsp;族：
             <asp:DropDownList ID="ddlNation" runat="server" DataSourceID="NationDataSource" DataTextField="NationName"
                        DataValueField="NationId" Font-Size="12px">
                    </asp:DropDownList>
           </div>
           <div class="person_neirong_list">学&nbsp;&nbsp;&nbsp;&nbsp;历：
             <asp:DropDownList ID="ddlAcademicCertificate" runat="server" Font-Size="12px">
                        <asp:ListItem Value="1">本科</asp:ListItem>
                        <asp:ListItem Value="2">大专</asp:ListItem>
                        <asp:ListItem Value="3">中专</asp:ListItem>
                    </asp:DropDownList>
           </div>
           <div class="person_neirong_list">身份证号：
             <asp:TextBox ID="txtIDCard" runat="server"></asp:TextBox>
           </div>
           <div class="person_neirong_list">毕业院校：
             <asp:TextBox ID="txtFinishShool" runat="server"></asp:TextBox>
           </div>

           <div class="person_neirong_list">毕业时间：
             <asp:TextBox ID="txtFinishShoolTime" runat="server"  CssClass="Wdate" onClick="WdatePicker()"></asp:TextBox>
           </div>          
         </div>
         <div class="person_xinxi_title">联系方式</div>
         <div class="person_xinxi_neirong">
           <div class="person_neirong_list">电&nbsp;&nbsp;&nbsp;&nbsp;话：
             <asp:TextBox ID="txtTelephone" runat="server"></asp:TextBox>
           </div>
           <div class="person_neirong_list">手&nbsp;&nbsp;&nbsp;&nbsp;机：
             <asp:TextBox ID="mob" runat="server"></asp:TextBox>
           </div>
           <div class="person_neirong_list">地&nbsp;&nbsp;&nbsp;&nbsp;址：
             <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
           </div>
           <div class="person_neirong_list">Email：&nbsp;&nbsp;&nbsp; 
             <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
           </div>
         </div>
         <div class="person_ziliao_save">
            <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="" CssClass="save_bg" OnClientClick="return checkfrm()" />
         </div>
         </form>
      </div>
    </div>
  </div>
 </div>
        <asp:ObjectDataSource ID="NationDataSource" runat="server" SelectMethod="FindAll"
            TypeName="TarreOA.TarreOABLL.NationManager"></asp:ObjectDataSource>
    </form>
</body>
</html>
<script type="text/javascript">
    function checkfrm()
    {
        if(document.getElementById('txtUserName').value =='')
        {
            alert('真实姓名不能为空！');
            return false;
        }
        if(document.getElementById('txtIDCard').value != '')
        {
            var reg=/\d{17}[\d|X]|\d{15}/;
            if(!reg.test(document.getElementById('txtIDCard').value))
            {
                alert('身份证号格式不正确！');
                return false;   
            }
        }
        if(document.getElementById('txtEmail').value != '')
        {
            var reg=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
            if(!reg.test(document.getElementById('txtEmail').value))
            {
                alert('Email格式不正确！');
                return false;   
            }
        }
        if(document.getElementById('txtFinishShool').value.length > 50)
        {
            alert('毕业院校长度必须小于50个字符！');
            return false;
        }
        if(document.getElementById('txtTelephone').value.length > 20)
        {
            alert('电话长度必须小于20个字符！');
            return false;
        }
        return true;
    }
</script>
